import { BaseEntity } from '@cool-midway/core';
import { Column, Entity, Index } from 'typeorm';

/**
 * loginlist模块-登陆信息
 */
@Entity('loginlist_info')
export class LoginlistInfoEntity extends BaseEntity {
  @Index()
  @Column({ comment: '登陆码', length: 50 })
  loginCode: string;

  @Column({ comment: '状态 0-未使用 1-已使用', default: 0 })
  status: number;

  @Column({ comment: '类型 0-普通 1-VIP', default: 0, type: 'tinyint' })
  type: number;

  @Column({ comment: '生成时间', type: 'datetime' })
  generateTime: Date;

  @Column({ comment: '使用时间', type: 'datetime', nullable: true })
  useTime: Date;

  @Column({ comment: '备注', nullable: true })
  remark: string;

  @Column({ comment: '关联订单', nullable: true })
  relatedOrder: string;

  @Column({ comment: '关联主播', nullable: true })
  relatedAnchor: string;

  @Column({ comment: '名称', nullable: true })
  username: string;

  @Column({ comment: '主播名称', nullable: true })
  anchorName: string;
  
}
